#ifndef __COMMON__
#define __COMMON__

#include <stdio.h>

#ifdef __cplusplus
extern "C" {
#endif

#define OFP_FIRMWARE_VERSION_LEN_MAX 100
#define OFP_UPGRADE_VERSION  "OFP UPGRADE VERSION 1.0.2"

#define OFP_TOOLS_VERSION  "OFP TOOLS VERSION 1.0.0"

#define OFP_LOGD_ENABLE
#define OFP_LOGE_ENABLE
#define OFP_LOGI_ENABLE


#ifdef  OFP_LOGD_ENABLE
#define OFP_LOGD(...) do { \
        printf("[ofilm  fingerprint] Debug: "); \
        printf(__VA_ARGS__); \
    } while(0)
#else
#define OFP_LOGD(...) do {} while(0)
#endif

#ifdef  OFP_LOGE_ENABLE
#define OFP_LOGE(...) do { \
        printf("[ofilm  fingerprint] Error: "); \
        printf(__VA_ARGS__); \
    } while(0)
#else
#define OFP_LOGE(...) do {} while(0)
#endif

#ifdef OFP_LOGI_ENABLE
#define OFP_LOGI(...) do { \
        printf("[ofilm  fingerprint] Info: "); \
        printf(__VA_ARGS__); \
    } while(0)
#else
#define OFP_LOGI(...) do {} while(0)
#endif

typedef struct {
    uint8_t *firmware_data;
    uint32_t firmware_len;
} ofp_upgrade_firmware;


#ifdef __cplusplus
}
#endif

#endif
